Skip to content

Conversation

@alrod
Copy link
Member

@alrod alrod commented Oct 2, 2025

This PR introduces a streamlined approach to zero-to-one scaling logic within the Azure SDK. The current implementation reads and parses all classic monitoring logs in the $log container to extract modified blob paths. However, for scale-out from zero to one, this level of detail is unnecessary.
The updated logic simplifies the process by checking only for the presence of write operations within the last two hours—without downloading or parsing the full log content. This optimization reduces memory consumption and improves performance, especially in environments with high write volumes.

@Copilot Copilot AI review requested due to automatic review settings October 2, 2025 00:07
@github-actions github-actions bot added the Storage Storage Service (Queues, Blobs, Files) label Oct 2, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements lightweight detection for write operations to optimize the scaling logic performance. Instead of parsing all logs to extract blob paths, it only checks for the presence of write operations to trigger scaling events.

  • Adds a new HasBlobWritesAsync method that efficiently detects write operations without full log parsing
  • Updates the scaling monitor to use the lightweight detection method
  • Removes unused test field and improves logging messages

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
BlobLogListener.cs Adds new HasBlobWritesAsync method for lightweight write operation detection
BlobScalerMonitorProvider.cs Updates scaling logic to use the new detection method and removes unused field
BlobLogListenerTests.cs Adds comprehensive test coverage for the new HasBlobWritesAsync method

Copy link
Member

@amnguye amnguye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. This comment I had was just something you didn't know about beforehand, since this change is something that recently happened on the Azure.Storage.Blobs package side.

@alrod alrod force-pushed the alrod/lighweight-new-writes-detection branch from 7404367 to 70d5716 Compare October 8, 2025 18:40
@amnguye amnguye merged commit 7fe1f68 into main Oct 8, 2025
17 checks passed
@amnguye amnguye deleted the alrod/lighweight-new-writes-detection branch October 8, 2025 19:08
@mathewc
Copy link
Member

mathewc commented Oct 8, 2025

@amnguye Nobody from the Functions side has yet had a chance to review this, and I see you just merged this?

@amnguye
Copy link
Member

amnguye commented Oct 8, 2025

@amnguye Nobody from the Functions side has yet had a chance to review this, and I see you just merged this?

I was under the impression that @alrod was from functions? That was my mistake then. I can revert the PR if you want and reopen this for review.

@pragnagopa
Copy link
Member

pragnagopa commented Oct 8, 2025

@amnguye - yes @alrod myself and @mathewc are from Functions. We want to ensure PRs coming from functions also get reviewed and approved by functions team before merging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Storage Storage Service (Queues, Blobs, Files)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants